package com.imooc.ecommerce.vo;

import com.imooc.ecommerce.account.UserAddress;
import com.imooc.ecommerce.goods.SimpleGoodsInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 *
   订单详情对象
 * @author zhangshao
 * @since 2023/12/13 23:12
 */
@ApiModel(description = "订单详情对象")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SingleOrderItem {
    @ApiModelProperty(value = "订单表主键 id")
    private Long id;

    @ApiModelProperty(value = "用户地址信息")
    private UserAddress userAddress;

    @ApiModelProperty(value = "订单商品信息")
    private List<SingleOrderGoodsItem> singleOrderGoodsItems;

    @ApiModel(description = "单个订单中的单项商品信息")
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class SingleOrderGoodsItem {
        @ApiModelProperty(value = "简单商品信息")
        private SimpleGoodsInfo simpleGoodsInfo;

        @ApiModelProperty(value = "商品个数")
        private Integer count;

    }
}



